package com.kele.basic;

import java.util.HashMap;
import java.util.Map;

/**
 * @author kele
 * @date 2021/10/9 17:03
 * @description
 */
public class MapTest {
    public static void main(String[] args) {

        Map<String, String> map=new HashMap<>();
        map.put("1","kele1");
        map.put("2","kele2");
        map.put("3","kele3");
        map.put("4","kele4");

        for (Map.Entry<String,String> keySet: map.entrySet()
             ) {
            System.out.println("key=>"+keySet.getKey());
            System.out.println("value=>"+keySet.getValue());
        }

        map.forEach((k,v)->{
            System.out.println(k+" : "+v);
        });
    }
}
